import math
import random
count1=0
def cjia(num1,num2):
    print(num1, "+", num2, "=")
    if int(input()) == num1 + num2:
        print("对了")
        count1+=1
    else:
        print("错了，菜就多练")
def cjian(num1,num2):
    print(num1, "-", num2, "=")
    if int(input()) == num1 - num2:
        print("对了")
        count1 += 1
    else:
        print("错了，菜就多练")
def ccheng(num1,num2):
    print(num1, "*", num2, "=")
    if int(input()) == num1 * num2:
        print("对了")
        count1 += 1
    else:
        print("错了，菜就多练")
def cchu(num1,num2):
    print(num1, "/", num2, "=")
    if int(input()) == num1 / num2:
        print("对了")
        count1 += 1
    else:
        print("错了，菜就多练")
count=int(input("请输入你要练的题数："))
count2=count
while count:
    suiji=random.randint(1,4)
    num1=random.randint(1,100)
    num2=random.randint(1,100)
    if suiji==1:
        cjia(num1,num2)
    elif suiji==2:
        cjian(num1,num2)
    elif suiji==3:
        ccheng(num1,num2)
    elif suiji==4:
        cchu(num1,num2)
    count-=1
print("你总共练习了",count2,"道题，对了",count1,"道题")